/*
 * Copyright (C) 2008 Chris Bellew
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#import <Foundation/Foundation.h>
#import <GraphicsServices/GraphicsServices.h>
#import <LayerKit/LayerKit.h>
#import <UIKit/UIKit.h>



@interface iDynDNSSettings : UIApplication {
	NSString* _username;
	NSString* _password;
	NSString* _hostname;
	NSString* _lastip;
	NSNumber* _updateInterval;
	BOOL _autoUpdate;


	NSString *_localAddress;

	BOOL _updateInProgress;

	NSDictionary *_statusCodes;
	
	NSDate *_lastUpdateDate;
	

}
+ (iDynDNSSettings *)sharedInstance;
- (void)setUsername:(NSString*)username;
- (NSString *)username;
- (void)setPassword:(NSString*)password;
- (NSString *)password;
- (void)setHostname:(NSString*)hostname;
- (NSString *)hostname;
- (void)setLastIP:(NSString*)lastip;
- (NSString *)lastip;
- (void)setUpdateInterval:(NSNumber*)updateInterval;
- (NSNumber *)updateInterval;
- (void)setAutoUpdate:(BOOL)autoUpdate;
- (BOOL)autoUpdate;

- (NSDictionary*)statusCodes;

- (NSString*)updateIP;

- (NSString *)localAddress;

- (void)getCurrentIP;
- (void)loadSettings;

- (void)saveSettings;

- (NSString *)base64Encoding:(NSString*)str;

- (NSDate*)lastUpdateDate;
- (void)setLastUpdateDate:(NSDate*)lastUpdateDate;

@end
